Generally, in a storage apparatus, in order to protect stored data, error correction encoding is performed when data is stored. As an example of error correction encoding, a product code to generate a code word two-dimensionally has been known.